The disclosure relates to a device for locking a bone fastening or fixation mechanism in a receiving member of a medical implant. The bone fastening or fixation mechanism is used to mount the receiving member to a bone structure in the medical implant. The locking device prevents the bone fastening mechanism from backing out of the receiving member.